<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //reverse 方法用于颠倒排列数组元素，返回改变后的数组。注意，该方法将改变原数组
        var a = ["a","b","c"];
        console.log(a.reverse());

        //实现一个字符串反转排列
        var str = "hello";
        console.log(str.split("").reverse().join(""));
        
        
    </script>
</body>
</html>